#ifndef __OLED_H
#define __OLED_H
#include "sys.h"
#include "iic.h"
#include "delay.h"
#include "time.h"
#include "stdio.h"

typedef struct {
    uint8_t normal_mode;
    uint8_t time_modify;
    uint8_t alarm_modify;
} OLED_MODE;

extern OLED_MODE oled_mode;

void oled_init(void);
void oled_write_cmd(uint8_t data);
void oled_write_data(uint8_t data);
void oled_set_cursor(uint8_t x, uint8_t y);
void oled_fill(uint8_t val);
void oled_show_char(uint8_t x, uint8_t y, char data, uint8_t high);
void oled_show_string(uint8_t x, uint8_t y, char *data, uint8_t high);
void oled_show_chinese_char(uint8_t x, uint8_t y, uint8_t index, uint8_t high);
void oled_show_chinese_string(uint8_t x, uint8_t y, uint8_t s_index, uint8_t e_index, uint8_t high);
void oled_show_picture(void);

void oled_temp_humd_show(void);
void oled_temp_humd_update(const uint8_t *data);

//void oled_normal_mode_show(const struct tm *time, const struct tm *alarm);
//void oled_time_modify_show(const struct tm *time);
//void  oled_alarm_modify_show(const struct tm *alarm);

#endif
